#ifndef READER_H
#define READER_H

#ifdef __cplusplus
extern "C" {
#endif

#define uchar   unsigned char

//社会保障（个人）卡规范
#define     IFD_OK                      0
#define     IFD_ICC_TypeError           -1
#define     IFD_ICC_NoExist             -2
#define     IFD_ICC_NoPower             -3
#define     IFD_ICC_NoResponse          -4
#define     IFD_ConnectError            -11
#define     IFD_UnConnected             -12
#define     IFD_BadCommand              -13
#define     IFD_ParameterError          -14
#define     IFD_CheckSumError           -15
#define     IFD_BadChipError            -16
#define     IFD_NotFindDeivce           -17
#define     IFD_CanNotCreateHandle      -18      

long ICC_Reader_Open(void);
long ICC_Reader_Close(void);
long ICC_Reader_PowerOn(uchar Slot,uchar* Response);
long ICC_Reader_PowerOff(uchar Slot);
long ICC_Reader_GetStatus(uchar Slot);
long ICC_Reader_Application(uchar slot,long length,uchar* Command,uchar* Response);
long ICC_Reader_Libinfo(char* Info);
long SerialNumber_Read(char* serial_number);
long ICC_Reader_GetDevID(char *DevID);

long Syn_Set_Configuration();
long Set_Path(char *path);
long Syn_Get_Data(char *card_info,char *photo_path);
long Syn_Select_Card();
long Syn_Find_Card();
long Syn_Read_Card(unsigned char* card_data,unsigned char*photo_data,unsigned char*
fingerprint_data);
long ICC_Reader_CertInfo(int index,char *photo_path,char *image_data,char *card_info);
long ICC_Reader_Beep(long time);

long Get_Lib_Version(char* lib_info);
long Get_Device_Version(char* device_info);

long Rf_Set_Type(uchar mode);
long Rf_Set_Antenna(uchar status);
long Rf_Search_Card(int delaytime,uchar* card_type);
long Rf_Anti_Collision(uchar* card_uid);
long Rf_Select_Card(void);
long Rf_Dormancy_Card(void);
long Rf_Verify_Card(int mode,uchar address,uchar* key);
long Rf_Read_Card(uchar address,uchar* data);
long Rf_Write_data(uchar address,uchar* data);
long Rf_Transfer_Card(uchar address);
long Rf_Restore_Card(uchar address);
long Rf_Activate_Card(int delaytime,uchar* card_type,uchar* card_uid);

long Get_Scanner(int voice_mode,long timeout,uchar* data);
long Get_KeyBoard(int voice_mode,long timeout,uchar* data);
long Get_MagneticTrack(int mode,long timeout,uchar* data);

#ifdef __cplusplus
}
#endif

#endif